Optimal. Leaf size=95 \[ \frac {i a^4 \tan ^2(e+f x)}{2 c f}+\frac {5 a^4 \tan (e+f x)}{c f}-\frac {8 i a^4}{f (c-i c \tan (e+f x))}+\frac {12 i a^4 \log (\cos (e+f x))}{c f}-\frac {12 a^4 x}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ \frac {i a^4 \tan ^2(e+f x)}{2 c f}+\frac {5 a^4 \tan (e+f x)}{c f}-\frac {8 i a^4}{f (c-i c \tan (e+f x))}+\frac {12 i a^4 \log (\cos (e+f x))}{c f}-\frac {12 a^4 x}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3487
Rule 3522
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^4}{c-i c \tan (e+f x)} \, dx &=\left (a^4 c^4\right ) \int \frac {\sec ^8(e+f x)}{(c-i c \tan (e+f x))^5} \, dx\\ &=\frac {\left (i a^4\right ) \operatorname {Subst}\left (\int \frac {(c-x)^3}{(c+x)^2} \, dx,x,-i c \tan (e+f x)\right )}{c^3 f}\\ &=\frac {\left (i a^4\right ) \operatorname {Subst}\left (\int \left (5 c-x+\frac {8 c^3}{(c+x)^2}-\frac {12 c^2}{c+x}\right ) \, dx,x,-i c \tan (e+f x)\right )}{c^3 f}\\ &=-\frac {12 a^4 x}{c}+\frac {12 i a^4 \log (\cos (e+f x))}{c f}+\frac {5 a^4 \tan (e+f x)}{c f}+\frac {i a^4 \tan ^2(e+f x)}{2 c f}-\frac {8 i a^4}{f (c-i c \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 3.14, size = 376, normalized size = 3.96 \[ -\frac {a^4 \sec (e) \sec ^2(e+f x) (\cos (e+5 f x)+i \sin (e+5 f x)) \left (-6 i f x \sin (2 e+f x)+2 \sin (2 e+f x)-6 i f x \sin (2 e+3 f x)-7 \sin (2 e+3 f x)-6 i f x \sin (4 e+3 f x)-2 \sin (4 e+3 f x)+6 f x \cos (2 e+3 f x)-3 i \cos (2 e+3 f x)+6 f x \cos (4 e+3 f x)+2 i \cos (4 e+3 f x)-3 i \cos (2 e+3 f x) \log \left (\cos ^2(e+f x)\right )+\cos (f x) \left (-9 i \log \left (\cos ^2(e+f x)\right )+18 f x+5 i\right )+\cos (2 e+f x) \left (-9 i \log \left (\cos ^2(e+f x)\right )+18 f x+10 i\right )-3 i \cos (4 e+3 f x) \log \left (\cos ^2(e+f x)\right )-3 \sin (f x) \log \left (\cos ^2(e+f x)\right )-3 \sin (2 e+f x) \log \left (\cos ^2(e+f x)\right )-3 \sin (2 e+3 f x) \log \left (\cos ^2(e+f x)\right )-3 \sin (4 e+3 f x) \log \left (\cos ^2(e+f x)\right )-6 i f x \sin (f x)-13 \sin (f x)\right )}{4 c f (\cos (f x)+i \sin (f x))^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 127, normalized size = 1.34 \[ \frac {-4 i \, a^{4} e^{\left (6 i \, f x + 6 i \, e\right )} - 8 i \, a^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + 8 i \, a^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + 10 i \, a^{4} + {\left (12 i \, a^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + 24 i \, a^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + 12 i \, a^{4}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{c f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, c f e^{\left (2 i \, f x + 2 i \, e\right )} + c f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.14, size = 200, normalized size = 2.11 \[ \frac {2 \, {\left (\frac {6 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c} - \frac {12 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c} + \frac {6 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{c} - \frac {13 \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 9 i \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 24 \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 9 i \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 13 \, a^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + i \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}^{2} c}\right )}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.20, size = 83, normalized size = 0.87 \[ \frac {5 a^{4} \tan \left (f x +e \right )}{c f}+\frac {i a^{4} \left (\tan ^{2}\left (f x +e \right )\right )}{2 c f}+\frac {8 a^{4}}{f c \left (\tan \left (f x +e \right )+i\right )}-\frac {12 i a^{4} \ln \left (\tan \left (f x +e \right )+i\right )}{f c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.72, size = 82, normalized size = 0.86 \[ \frac {5\,a^4\,\mathrm {tan}\left (e+f\,x\right )}{c\,f}+\frac {a^4\,{\mathrm {tan}\left (e+f\,x\right )}^2\,1{}\mathrm {i}}{2\,c\,f}+\frac {8\,a^4}{c\,f\,\left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}-\frac {a^4\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,12{}\mathrm {i}}{c\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.46, size = 146, normalized size = 1.54 \[ \frac {12 i a^{4} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c f} + \frac {- 12 a^{4} e^{2 i e} e^{2 i f x} - 10 a^{4}}{i c f e^{4 i e} e^{4 i f x} + 2 i c f e^{2 i e} e^{2 i f x} + i c f} + \begin {cases} - \frac {4 i a^{4} e^{2 i e} e^{2 i f x}}{c f} & \text {for}\: c f \neq 0 \\\frac {8 a^{4} x e^{2 i e}}{c} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________